﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
using DevComponents.DotNetBar;
using CamDo.BUL;

namespace CamDo
{
    public partial class frmDangNhap : Office2007Form
    {
        public frmDangNhap()
        {
            InitializeComponent();
        }

        private void btnLogin_Click_1(object sender, EventArgs e)
        {
            QuanLyNguoiDung qlNguoiDung = new QuanLyNguoiDung();
            String userName = txtUserName.Text;
            String passWord = txtPass.Text;
            if (qlNguoiDung.isLogin(userName, passWord))
            {
                new frmMain().Show();
                this.Hide();
            }
            else
            {
                error.Text = "Bạn hãy kiểm tra lại Mã người dùng và mật khẩu";
               
 
            }
            
        }

        private void btnCLose_Click(object sender, EventArgs e)
        {
            this.Close();
           
        }

        private void labelDANGNHAP_Click(object sender, EventArgs e)
        {
          
        }

        private void txtUserName_TextChanged(object sender, EventArgs e)
        {
        }

        

    }
}